/**
 * FriendRelationServiceImpl.java
 */
package com.tobeface.sns.application.pal.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.kissme.core.orm.Page;
import com.tobeface.sns.application.pal.FriendRelationService;
import com.tobeface.sns.domain.User;
import com.tobeface.sns.infrastructure.persist.pal.FriendRelationRepository;

/**
 * @author Dylan
 * @time 2012-7-30
 */
@Service
public class FriendRelationServiceImpl implements FriendRelationService {

	@Resource
	private FriendRelationRepository repository;

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.sinzv.sns.infrastructure.persist.pal.FriendRelationRepository#
	 * attentionFriend(com.sinzv.sns.domain.User, com.sinzv.sns.domain.User)
	 */
	@Override
	public void attentionFriend(User self, User friend) {
		repository.attentionFriend(self, friend);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.sinzv.sns.infrastructure.persist.pal.FriendRelationRepository#
	 * cancelAttention(com.sinzv.sns.domain.User, com.sinzv.sns.domain.User)
	 */
	@Override
	public void cancelAttention(User self, User friend) {
		repository.cancelAttention(self, friend);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.sinzv.sns.infrastructure.persist.pal.FriendRelationRepository#
	 * attentionWho(com.sinzv.sns.domain.User)
	 */
	@Override
	public Page<User> attentionWho(Page<User> page, User self) {
		return repository.attentionWho(page, self);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.sinzv.sns.infrastructure.persist.pal.FriendRelationRepository#
	 * whoAttention(com.sinzv.sns.domain.User)
	 */
	@Override
	public Page<User> whoAttention(Page<User> page, User self) {
		return repository.whoAttention(page, self);
	}

}
